<?php

class GroundTownExtendAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     *
     * 扩展地块
     * @param $userId
     * @param $blockId
     * @return SzResponse
     */
    public function execute($userId, $blockId)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_EXTEND_GROUND)) {
            return $this->buildResponse(false);
        }

        return $this->buildResponse(
            array(
                GroundService::get()->extend($userId, $blockId)
            )
        );
    }
}